﻿@model ProfileIndexModel
@{
    Layout = "_ColumnsOne";

    Html.AddTitleParts(T("PageTitle.Profile").Text);
}
<div class="page profile-page">
    <h1 class="h2 text-xs-center generalTitle">@Model.ProfileTitle</h1>
    <div class="tabs inbox-tabs row px-3" id="tabs" role="tablist">
        <ul class="col-sm-12 nav nav-tabs mb-2" role="tablist">
            <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#tab1" role="tab">@T("Profile.PersonalInfo")</a></li>
            @if (Model.ForumsEnabled)
            {
                <li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#tab2" role="tab">@T("Profile.LatestPosts")</a></li>
            }
        </ul>
        <div class="tab-content col-sm-12 px-0">
                <div id="tab1" class="tab-pane" role="tabpanel">
                    @await Component.InvokeAsync("ProfileInfo", new { customerProfileId = Model.CustomerProfileId })
                </div>
                @if (Model.ForumsEnabled)
                {
                    <div id="tab2" class="tab-pane active" role="tabpanel">
                        @await Component.InvokeAsync("ProfilePosts", new { customerProfileId = Model.CustomerProfileId, pageNumber = Model.PostsPage })
                    </div>
                }
        </div>
    </div>
</div>